﻿using System;
using System.Collections.Generic;
using System.Text;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;

namespace Himp.Outpatient
{
    public class InvoUsedRec : FullAuditedAggregateRoot<Guid>, IMultiTenant
    {
        /// <summary>
        /// 发票号
        /// </summary>
        public string Invno { get; set; }

        /// <summary>
        /// 订单号
        /// </summary>
        public string OrdNo { get; set; }

        /// <summary>
        /// 业务来源
        /// 药房零售 = 0,
        /// 门诊挂号 = 1,
        /// 门诊处方 = 2,
        /// 会员充值 = 3,
        /// 会员套餐 = 4
        /// </summary>
        public int OrdBizSouc { get; set; }

        /// <summary>
        /// 发票号二维码
        /// </summary>
        public string? InvQrcode { get; set; }

        /// <summary>
        /// 发票状态
        /// </summary>
        public int InvStas { get; set; }

        /// <summary>
        /// 作废时间
        /// </summary>
        public DateTime? CnclTime { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Guid? CnclOperId { get; set; }

        public Guid? TenantId { get; set; }

        public InvoUsedRec()
        {

        }

        public InvoUsedRec(string ordNo, int ordBizSouc)
        {
            OrdNo = ordNo;
            OrdBizSouc = ordBizSouc;
            InvStas = 0;
            Invno = Guid.NewGuid().ToString();
        }
    }
}
